package org.example.dao.inter;

import org.example.entitys.managers.Course;
import org.example.entitys.relationship.Unit;
import org.example.entitys.relationship.student_unit_learning;
import org.example.entitys.relationship.teaching_evaluation;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

/**
 * @Description
 * @Author 魏锴
 * @Date 2023/11/15
 */
public interface CourseDao {
    int insertCourse(Course course);//添加课程

    int insertLearnUnit(Unit unit);//添加学习单元

    boolean isExitCourseById(int course_id);//课程id

    boolean isExitLearnUnitById(int unit_id);//根据unit_id查询是否存在unit

    Course queryCourseById(int course_id);

    Unit queryUnitById(int unit_id);

    List<student_unit_learning> queryUnitRecordByUnit(int unit_id);

    List<student_unit_learning> queryUnitRecordBySCI(int stu_in_class_id);

    List<Course> queryAllCourse();

    List<Unit> queryAllUnit();

    Course courseTransform(ResultSet rs, int RowNum) throws SQLException;

    Unit unitTransform(ResultSet rs, int RowNum) throws SQLException;

    student_unit_learning learningTransform(ResultSet rs, int RowNum) throws SQLException;

    int insertEvaluation(teaching_evaluation eva);
}
